﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _2021_5_24
{
    //车
    class Car
    {
        private string band;
        private string type;

        public string Band { get => band; set => band = value; }
        public string Type { get => type; set => type = value; }

        public Car(string band, string type)
        {
            this.Band = band;
            this.Type = type;
        }

        public void Run()
        {
            Console.WriteLine("一辆{0} {1}正在奔驰。",this.band , this.type);
        }

    }
    //飞（接口）
    interface IFly
    {
        void Fly();
    }
    //开火（接口）
    interface IFire
    {
        void Fire();
    }

    //蝙蝠战车
    class BMCar : Car , IFire , IFly
    {
        public BMCar(string type , string band = "蝙蝠战车") : base(band: band, type: type) { }

        public void Fire()
        {
            Console.WriteLine("{0} {1}: 哒哒哒哒哒哒...",this.Band , this.Type);
        }

        public void Fly()
        {
            Console.WriteLine("{0} {1} 在天上飞...", this.Band, this.Type);
        }
    }
}
